package com.shum1n.gmall.service;


import com.shum1n.gmall.bean.UserAddress;



import java.util.List;

public class UserServiceStub implements UserService  {

    final private UserService userService;

    /**
     * 只提供有参构造的方式
     * dubbo 会自动创建本地存根对象
     * @param userService 远程代理对象
     */
    public UserServiceStub(UserService userService) {
        this.userService = userService;
    }

    @Override
    public List<UserAddress> getUserAddressList(String userId) {
        System.out.println("本地存根被调用，UserServiceStub.......");
        if(userId != null && ! "".equals(userId)){
            return userService.getUserAddressList(userId);
        }
        return null;
    }
}
